<?php

namespace App\Requests\HotelImage;

use App\Requests\BaseRequest;

/**
 * @property int $id 该数据
 * @property int $hotel_id 酒店ID
 * @property int $type 类型
 * @property int $cat_id 分类ID
 * @property string $image 图片
 */
class StoreRequest extends BaseRequest
{
    /**
     * 定义规则信息
     *
     * @return array
     */
    public function rules()
    {
        return [
            'hotel_id'  => 'required|integer|min:1',
            'type'      => 'required|integer|min:1',
            'cat_id'    => 'required|integer|min:1',
            'thumbnail' => 'required|string|max:255',
            'thumbnail' => 'required|string|max:255',
            'sort'      => 'required|integer|min:0',
        ];
    }

    /**
     * 定义字段对应的名称
     *
     * @return array
     */
    public function attributes()
    {
        return [
            'id'        => '该数据',
            'hotel_id'  => '酒店ID',
            'type'      => '类型',
            'cat_id'    => '分类ID',
            'thumbnail' => '图片',
        ];
    }
}
